package com.example.wlzz.repository.mongoRepository;

import com.example.wlzz.entity.mongoEntity.Task;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

public interface TaskRepository extends MongoRepository<Task,String>{
    Page<Task> findByUseridAndDelFlagAndStatus(Integer userid,int del_flag,int status,Pageable pageable); //根据userid查询任务。
    Page<Task> findByUseridAndDelFlag(Integer userid,int del_flag,Pageable pageable); //根据userid查询任务。
    Page<Task> findByDelFlag(int del_flag,Pageable pageable);
    Page<Task> findByCategoryAndDelFlag(String category,int del_flag,Pageable pageable);
    Task findBy_idAndDelFlag(String _id,int del_flag);

    Task findBy_id(String _id);

    Page<Task> findByDelFlagAndSchool(int del_flag,String school,Pageable pageable);
    Page<Task> findByCategoryAndDelFlagAndSchool(String category,int del_flag,String school,Pageable pageable);
}
